home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-07 | 8.7 KB | 8 lines | [ONLN/HLX2] |
- Sample ComponentsPeter Hoddie©1992 Apple Computer, Inc.This unnamed collection of sample code provides six different sample components which show how you can extend QuickTime. Taken as a whole, they provide a complete example of how to add your own fully supported data type to QuickTime.This sample Derived Media Handler overrides portions of the Base Media Handler to provide a new QuickTime Media Handler which uses QuickDraw Pictures as its samples. Every frame added to a PICT track is a QuickDraw Picture. This is particularly convenient for sample code, since all that is required to draw the image is a call to DrawPicture.The easiest way to create a movie that contains a track which uses the PICT Media Handler is to use the Movie Import Component (described below) to convert your Scrapbook file into a QuickTime movie. The sample Movie Import Component allows you to convert all of the PICT images in a Scrapbook file into a QuickTime movie that uses the PICT Media Handler.To use the Movie Import Component, check out the ImportExportMovie sample code and application also on this QuickTime 1.5 CD. You can also use it from the Standard File Preview dialog in most applications that open movies.The sample Movie Export Component takes a PICT Media Handler track and converts it to a PICS file. Because the samples in a PICT Track are simply QuickDraw Pictures, this process is trivial.To use the Movie Export Component, check out the ImportExportMovie sample code and application also on this QuickTime 1.5 CD.The sample File Preview Component displays previews for PICS files. QuickTime 1.5 contains a PICS Movie Import Component, but no PICS File Preview Component. It would be trivial to modify this component so that you could preview Scrapbook files (which would compliment the Movie Import Component sample code nicely).To use the File Preview Component simply use Standard File Preview to open a movie (in MoviePlayer, for example). PICS files are shown automatically (because QuickTime contains a PICS MovieImport Component). You will be able to preview them from the dialog now.The sample Sequence Grab Channel Component captures a PICT Track. It captures the image from the area surrounding the current cursor position on the main screen. This is by far the most complex piece of sample code. It shows everything necessary to add the ability to capture new types of data to QuickTime.There is no terribly easy way to use the Sequence Grab Channel Component, short of modifiying the Hack TV sample application on this disk to let you create a PICT grab channel.The sample Sequence Grab Panel Component implements a panel for the PICT Sequence Grab Channel. The panel lets you configure the one option of the PICT Sequence Grab Channel - whether or not it displays the current value of Ticks in the image.Again, there is no terribly easy way to use the Sequence Grab Panel Component, short of modifiying the Hack TV sample application.An MPW make file has been provided for these sample components. Also, a complete build of the sample components is also provided. You can drop it into your Extensions Folder, reboot, and start using some of the Component immediately.Note that these sample Components are meant to be instructive. They are not intended to be the basis of a real product. Furthermore, they only perform limited error checking. For more details on these component types, please see the apporpriate chapter in the QuickTime Components documentation.Ê ◊# ˇ ˇˇˇˇ # ◊